/*   1:    */ package gov.sat.tax.fwsk.wlrz;
/*   2:    */ 
/*   3:    */ import java.io.PrintStream;
/*   4:    */ import java.util.GregorianCalendar;
/*   5:    */ 
/*   6:    */ public class RzCheckKprqLimit
/*   7:    */ {
/*   8:    */   public static boolean fpCheckKprqLimit(String kprq, String rzsj)
/*   9:    */   {
/*  10: 32 */     GregorianCalendar dkpt = null;
/*  11: 33 */     GregorianCalendar dnow = new GregorianCalendar();
/*  12: 34 */     GregorianCalendar d0301 = new GregorianCalendar(2003, 2, 1);
/*  13: 35 */     GregorianCalendar d0901 = new GregorianCalendar(2003, 8, 1);
/*  14:    */     
/*  15:    */ 
/*  16: 38 */     GregorianCalendar d090101 = new GregorianCalendar(2009, 0, 1);
/*  17:    */     int kd;
/*  18: 48 */     if (kprq.length() == 8)
/*  19:    */     {
/*  20: 51 */       int ky = Integer.parseInt(kprq.substring(0, 4));
/*  21: 52 */       int km = Integer.parseInt(kprq.substring(4, 6));
/*  22: 53 */       kd = Integer.parseInt(kprq.substring(6, 8));
/*  23:    */     }
/*  24:    */     else
/*  25:    */     {
/*  26:    */       int kd;
/*  27: 56 */       if (kprq.length() == 6)
/*  28:    */       {
/*  29: 59 */         int ky = Integer.parseInt(kprq.substring(0, 2)) + 2000;
/*  30: 60 */         int km = Integer.parseInt(kprq.substring(2, 4));
/*  31: 61 */         kd = Integer.parseInt(kprq.substring(4, 6));
/*  32:    */       }
/*  33:    */       else
/*  34:    */       {
/*  35: 63 */         return false;
/*  36:    */       }
/*  37:    */     }
/*  38:    */     int kd;
/*  39:    */     int km;
/*  40:    */     int ky;
/*  41: 64 */     dkpt = new GregorianCalendar(ky, km - 1, kd);
/*  42: 67 */     if (rzsj != null)
/*  43:    */     {
/*  44: 69 */       int ry = Integer.parseInt(rzsj.substring(0, 4));
/*  45: 70 */       int rm = Integer.parseInt(rzsj.substring(5, 7));
/*  46: 71 */       int rd = Integer.parseInt(rzsj.substring(8, 10));
/*  47: 72 */       dnow = new GregorianCalendar(ry, rm - 1, rd);
/*  48:    */     }
/*  49: 78 */     if (dkpt.before(d0301)) {
/*  50: 81 */       return dnow.before(d0901);
/*  51:    */     }
/*  52: 85 */     d0901 = dkpt;
/*  53: 87 */     if (ky >= 2010)
/*  54:    */     {
/*  55: 89 */       d0901.add(6, 180);
/*  56: 90 */       System.out.println("[info] kp data limit 180 day kp-year: " + ky);
/*  57:    */     }
/*  58:    */     else
/*  59:    */     {
/*  60: 94 */       d0901.add(6, 90);
/*  61: 95 */       System.out.println("[info] kp data limit 90 day kp-year: " + ky);
/*  62:    */     }
/*  63:101 */     return dnow.before(d0901);
/*  64:    */   }
/*  65:    */ }


/* Location:           D:\htjs\document\wsrz\WsrzEjbInf\
 * Qualified Name:     gov.sat.tax.fwsk.wlrz.RzCheckKprqLimit
 * JD-Core Version:    0.7.0.1
 */